package io.xccit.processor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @author Xccit
 * @Date 2023-01-20
 * @Description
 */
public class PojoBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("bean后置处理器的postProcessBeforeInitialization()被调用...");
        return BeanPostProcessor.super.postProcessBeforeInitialization(bean, beanName);
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("bean后置处理器的postProcessAfterInitialization()被调用...");
        return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName);
    }
}
